package com.cyb.example.provider;

import com.cyb.crpc.RpcApplication;
import com.cyb.crpc.registry.LocalRegistry;
import com.cyb.crpc.server.HttpServer;
import com.cyb.crpc.server.VertxHttpServer;
import com.cyb.example.common.service.UserService;
import com.cyb.example.provider.service.UserServiceImpl;

public class ExampleProviderApplication {
    public static void main(String[] args) {

        // RPC框架初始化
        RpcApplication.init();

        // 注册服务
        LocalRegistry.register(UserService.class.getName(), UserServiceImpl.class);

        // 启动web服务器
        VertxHttpServer server = new VertxHttpServer();
        server.doStart(8080);
    }
}